package org.bdd4j.example;

import org.bdd4j.Given;
import org.bdd4j.Scenario;
import org.bdd4j.Story;
import org.bdd4j.Then;
import org.bdd4j.When;

@Story("Creating a person sets first and last name and displays full name properly")
public class PersonFullNameFormatStory extends Scenario{

	private Person p;
	
	@Given("The person is not null")
	public void personIsNotNull(){
		p = new Person();
	}
	
	@When("The first name is set")
	public void setFirstName(){
		p.setFirstName("Matt");
	}
	
	@When("The last name is set")
	public void setLastName(){
		p.setLastName("Givney");
	}
	
	@Then("Verify toString() formats the first and last name properly")
	public void verifyTheNameFormatsProperly(){
		assertEqual(p.toString(), "Matt Givney");
	}
}